package com.leetcode.tools;

 public class ListNode {
     public int val;
     public ListNode next;
     public ListNode(int x) { val = x; }

     @Override
     public String toString(){
         ListNode list = this;
         String ret="";
         while(list!=null){
             ret=ret+list.val;
             list=list.next;
         }
         return ret;
     }
 }
